package com.yjzx.util.service.enums.file;

/**
 * @author yjzx
 * @date 2024/8/13
 * @description 视频文件类型枚举
 */
public enum VideoFileTypeEnum implements FileType{
    /**
     * 视频文件类型枚举
     */
    ASF(".asf", "video/x-ms-asf"),
    ASX(".asx", "video/x-ms-asf"),
    FLV(".flv", "video/x-flv"),
    WEBM(".webm", "video/webm"),
    WMV(".wmv", "video/x-ms-wmv"),
    MP4(".mp4", "video/mp4"),
    MP4V(".mp4v", "video/mp4"),
    MPG4(".mpg4", "video/mp4"),
    MPEG4(".mpeg4", "video/mp4"),
    MKV(".mkv", "video/x-matroska"),
    MOV(".mov", "video/quicktime"),
    MPEG(".mpeg", "video/mpeg"),
    MPG(".mpg", "video/mpeg"),
    MPA(".mpa", "video/mpeg"),
    M4V(".m4v", "video/mp4"),
    MPA1(".mpa1", "video/mpeg"),
    MPG1(".mpg1", "video/mpeg"),
    MPEG1(".mpeg1", "video/mpeg"),
    MPA4(".mpa4", "video/mp4"),
    MPA5(".mpa5", "video/mp4"),
    MPG_V(".mpgv", "video/mpeg"),
    MPEG_V(".mpegv", "video/mpeg"),
    MPG_V1(".mpgv1", "video/mpeg"),
    MPEG_V1(".mpegv1", "video/mpeg"),
    MPA_V(".mpav", "video/mpeg"),
    MPA_V1(".mpav1", "video/mpeg"),
    DASH(".dash", "application/dash+xml"),
    VTT(".vtt", "text/vtt"),
    AVI(".avi", "video/avi"),
    /**
     * 字幕格式
     */
    SRT(".srt", "application/x-subrip"),
    SUB(".sub", "application/octet-stream"),
    SSA(".ssa", "application/octet-stream"),
    ASS(".ass", "application/octet-stream"),
    IDX(".idx", "application/octet-stream"),
    SMI(".smi", "application/octet-stream"),
    ;

    VideoFileTypeEnum(String extension, String mimeType) {
        this.extension = extension;
        this.mimeType = mimeType;
    }
    private final String extension;

    private final String mimeType;
    @Override
    public String getExtension() {
        return extension;
    }

    @Override
    public String getMimeType() {
        return mimeType;
    }

}
